<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@page import="java.util.Calendar"%>
<?xml version="1.0" charset="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
"http://www.wapforum.org/DTD/xhtml-mobile10.dtd">

<html>
  <head>
    <title>Agregar productos</title>
  </head>
  <body>
    <h3>Agregue un producto</h3>
    <font size="2"><i>${sessionScope.customer.name}</i></font><br/><br/>
    
    <form name="form1" action="OrderServlet" method="POST">
      <select name="product">
        <c:forEach var="product" items="${requestScope.productCatalog}">
          <c:choose>
            <c:when test="${product.id!=null}">
              <option value="${product.id}">${product.description}&nbsp;[<fmt:formatNumber value="${product.stock}" pattern="#,##0.00"/>]</option>
            </c:when>
            <c:otherwise>
              <option value="/*/">${product.description}</option>
            </c:otherwise>
          </c:choose>
        </c:forEach>
      </select><br>
      
      Cantidad:<input type="text" name="qty" value="" size="4"/>
           
      <select name="unit">
        <option value="CA">Cajas</option>
        <option value="BT">Botellas</option>
      </select>
      <br>
      <br>



     Fecha Req:
<input type="text" name="reqdatday" value=${sessionScope.reqDayOrd}   size="2" maxlength="2"/>
<input type="text" name="reqdatmon" value=${sessionScope.reqMonthOrd}   size="2" maxlength="2"/>
<input type="text" name="reqdatyea" value=${sessionScope.reqYearOrd} size="4" maxlength="4"/><br/> 

<br>
<br>
      
      <input type="submit" value="Agregar" name="action" />
      <input type="submit" value="Cancelar" name="action" />
      
    </form>
    
    
  </body>
</html>
